#ifndef LIGHT_H
#define LIGHT_H

#include <stdlib.h>
#include <stdio.h>

typedef struct light_t {
	uint16_t _lux;
} light;

/**
 * Allocates a light-object
 */
light* light_alloc(uint16_t lux);
/**
 * Frees a light-object
 */
void light_free(light *l);

/**
 * Calculates which pins you must set to high, with a fuzzy algorithm.
 * \return The insensity from 0 to 7 is returned. (0 = very bright light)
 */
uint8_t light_calc(light *l);

#endif
